﻿<s:SurfaceUserControl x:Class="MediaSurfaceV2.SurfaceUserControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008" Background="Transparent" Height="Auto" Width="Auto">
    <Border>
    	<Border.Background>
    		<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
    			<GradientStop Color="#FF605F5F" Offset="1"/>
    			<GradientStop Color="Black" Offset="0"/>
    		</LinearGradientBrush>
    	</Border.Background>
    <DockPanel  Background="Transparent"  Width="Auto" Height="Auto" LastChildFill="False" >

        <DockPanel Background="Transparent" DockPanel.Dock="Top">
        	<Image Source="C:\Users\Public\coquette-icons-set\png\128x128\delete.png" Height="30" Width="30" DockPanel.Dock ="Right" s:Contacts.ContactDown="Image_ContactDown"/>
            <Label HorizontalAlignment="Center" VerticalAlignment="Center" Height="28" Width="Auto" Name="Title_Label" Background="Transparent" Margin="0" FontWeight="Bold" ToolTip="Show the Title" Foreground="White">Now Playing</Label>
            
        </DockPanel>


        <DockPanel DockPanel.Dock="Top" Visibility="Visible"    LastChildFill="True" x:Name="mediaControls">


            <MediaElement  Margin="0"
                              Name="McMediaElement" 
                              
                              Height="Auto"
                          
                              LoadedBehavior="Manual" 
                              UnloadedBehavior="Stop" 
                                  
                              IsHitTestVisible="True"
                              MediaOpened="Element_MediaOpened" 
                              MediaEnded="Element_MediaEnded" DockPanel.Dock="Top"
                            Width="Auto" Volume="0.4" ClipToBounds="False" Stretch="Uniform" >


            </MediaElement>

            <DockPanel DockPanel.Dock="Top" LastChildFill="True">    
            <StackPanel Name="mediaInfo_StackPanel"  VerticalAlignment="Center" Visibility="Visible"  Orientation="Vertical" Height="240" Width="240" TextBlock.Foreground="Yellow"  Background="Black" DockPanel.Dock="Left">

                <StackPanel Orientation="Horizontal" >
                    <Label Foreground="Red" VerticalAlignment="Center" >Title :</Label>
                    <TextBlock VerticalAlignment="Center" Name="title_textBox"  Width="180"  TextWrapping="Wrap"></TextBlock>
                </StackPanel>


                <StackPanel Orientation="Horizontal">
                    <Label Foreground="Red" VerticalAlignment="Center" >Genre :</Label>
                    <TextBlock VerticalAlignment="Center"  Name="tag_textBox"  Width="180"  TextWrapping="Wrap"></TextBlock>
                </StackPanel>

                <StackPanel Orientation="Horizontal">
                    <Label Foreground="Red"  VerticalAlignment="Center" >Description :</Label>
                    <TextBlock VerticalAlignment="Center" Name="description_textBox" Width="180"  TextWrapping="Wrap"></TextBlock>
                </StackPanel>

                <StackPanel Orientation="Horizontal">
                    <Label Foreground="Red"  VerticalAlignment="Center" >Length :</Label>
                    <TextBlock Name="length_textBox" Width="30" VerticalAlignment="Center"  TextWrapping="Wrap"></TextBlock>
                    <Label Foreground="Red" VerticalAlignment="Center" >minutes</Label>
                </StackPanel>


                <StackPanel Orientation="Horizontal">
                    <Label Foreground="Red" VerticalAlignment="Center" >Uploaded By :</Label>
                    <TextBlock VerticalAlignment="Center" Name="pool_textBox" Width="180"  TextWrapping="Wrap"></TextBlock>
                </StackPanel>

                <StackPanel Orientation="Horizontal">
                    <Label Foreground="Red" VerticalAlignment="Center" >Aspect Ratio :</Label>
                    <TextBlock VerticalAlignment="Center" Name= "aspect_Ratio_textBox" Width="180"  TextWrapping="Wrap"></TextBlock>
                </StackPanel>


            </StackPanel>

            <StackPanel Name="thumbnail_stackPanel"  Visibility="Visible" VerticalAlignment="Center" Width="180" Background="Black" DockPanel.Dock="Right">
                <Image Name="movie_thumnnail" Source="C:\\Images\\Background2.jpg" Height="240" Width="180" VerticalAlignment="Center"  ></Image>
            </StackPanel>

            </DockPanel>









        </DockPanel>

        <StackPanel Background="Transparent" Width="Auto"  Height="50" Orientation="Horizontal"  VerticalAlignment="Bottom" DockPanel.Dock="Top" >


            <Image Name="Play_Image" Source="C:\Users\Public\coquette-part-6-icons-set\png\128x128px\play.png"   s:Contacts.ContactDown="OnContactDownPlayMedia" Margin="5"  />



            <!-- Seek to slider. Ths slider allows you to jump to different parts of the media playback. -->
            <TextBlock Foreground="White" Margin="5"  VerticalAlignment="Center">Seek To</TextBlock>
            <s:SurfaceSlider Name="timelineSlider"  VerticalAlignment="Center" Height="10" Margin="5" ValueChanged="SeekToMediaPosition" ContactDown="slider_ContactChanged" ContactUp="slider_ContactChanged" MinWidth="180"/>

            <!-- Volume slider. This slider allows a Volume range between 0 and 1. -->
            <TextBlock Foreground="White" VerticalAlignment="Center" Margin="5"  >Volume</TextBlock>
            <s:SurfaceSlider Name="volumeSlider" VerticalAlignment="Center" ValueChanged="ChangeMediaVolume" 
                        Minimum="0" Maximum="1" Value="0.5"   MinWidth="70"/>

        </StackPanel>

    </DockPanel>
</Border>
</s:SurfaceUserControl>
